export default class GameOver extends Laya.Script {
        /** @prop {name:txt_1, tips:"txt", type:Node, default:null}*/
        txt_1=null;
        /** @prop {name:tu, tips:"tu", type:Node, default:null}*/
        tu=null;
        /** @prop {name:btn_start, tips:"start", type:Node, default:null}*/
        btn_start=null;
        owner=((this.owner as Laya.Script))
    constructor() { 
        super(); 

        // 更多参数说明请访问: https://ldc2.layabox.com/doc/?nav=zh-as-2-4-0
    }
    onAwake(){
        Laya.stage.on("AI+",this,this.AI);
        Laya.stage.on("Player+",this,this.PLayer);
        this.btn_start.on(Laya.Event.CLICK,this,this.start)
    }
    start(){
        this.owner.visible=false;
        Laya.stage.event("start");
    }
    AI(){
        this.owner.visible=true;
        this.txt_1.text="输了"
        Laya.SoundManager.playSound("res/sound/shu.wav",1);
        this.tu.skin="res/胡桃1.png"
    }
    PLayer(){
        this.owner.visible=true;
        this.txt_1.text="赢了"
        Laya.SoundManager.playSound("res/sound/ying.wav",1);
        this.tu.skin="res/胡桃2.png"
    }
}